home *** CD-ROM | disk | FTP | other *** search
/ Champak 49 / Volume 49 - JOGO DISK .iso / Games / feverfrenzy-demo.swf / scripts / DefineSprite_110 / frame_1 / DoAction.as
Text File  |  2007-09-28  |  2KB  |  79 lines

  1. function aura(onoff)
  2. {
  3.    if(onoff)
  4.    {
  5.       gotoAndStop("aura");
  6.       play();
  7.    }
  8.    else
  9.    {
  10.       gotoAndStop("no_aura");
  11.    }
  12. }
  13. function isEmpty()
  14. {
  15.    return mPaciente == null || mPaciente == undefined;
  16. }
  17. function addPaciente(paciente)
  18. {
  19.    var _loc3_ = {x:this._xmouse,y:this._ymouse};
  20.    this.localToGlobal(_loc3_);
  21.    if(!mMouseMask_mc.hitTest(_loc3_.x,_loc3_.y,false))
  22.    {
  23.       return false;
  24.    }
  25.    if(!_parent.mClosed_mc.hasPosition())
  26.    {
  27.       return false;
  28.    }
  29.    if(mPaciente != null && mPaciente != undefined)
  30.    {
  31.       if(!(mPaciente.terminouPressao() && _parent.mClosed_mc.hasPosition()))
  32.       {
  33.          return false;
  34.       }
  35.       liberaPacienteParaSalao();
  36.       if(!_parent.mClosed_mc.hasPosition())
  37.       {
  38.          return false;
  39.       }
  40.    }
  41.    mPaciente = paciente;
  42.    mPaciente.medindoPressao();
  43.    mPaciente._x = this._x;
  44.    mPaciente._y = this._y - 10;
  45.    return true;
  46. }
  47. function liberaPacienteParaSalao()
  48. {
  49.    paciente = mPaciente;
  50.    liberaPaciente();
  51.    _parent.mClosed_mc.arrivePatient(paciente);
  52. }
  53. function liberaPaciente()
  54. {
  55.    _parent.mPressure_mc.gotoAndStop(1);
  56.    _parent.mDisease_mc.showDisease(mPaciente.getTipo() + 1);
  57.    mPaciente = null;
  58. }
  59. function liberaPacienteEx(paciente)
  60. {
  61.    if(mPaciente == paciente)
  62.    {
  63.       _parent.mPressure_mc.gotoAndStop(1);
  64.       mPaciente = null;
  65.    }
  66. }
  67. function voltaPaciente(paciente)
  68. {
  69.    mPaciente = paciente;
  70.    _parent.mPressure_mc.gotoAndPlay(1);
  71. }
  72. stop();
  73. var mPaciente;
  74. mMouseMask_mc._visible = false;
  75. if(this._currentframe == 1)
  76. {
  77.    mDisease_mc._visible = false;
  78. }
  79.